/*============================================================================
 PROJECT: TalkWrench
 FILE:    PhotoPresentationView.h
 AUTHOR:  MACBOOK PRO
 DATE:    2/23/13
 =============================================================================*/

/*============================================================================
 IMPORT
 =============================================================================*/
#import <UIKit/UIKit.h>


/*============================================================================
 MACRO
 =============================================================================*/

/*============================================================================
 PROTOCOL
 =============================================================================*/
@class PhotoPresentationView;
@protocol PhotoPresentationViewDelegate <NSObject>
@optional
- (void)photoPresentationView:(PhotoPresentationView *)view didDeletePhotoAtIndex:(NSInteger)index;
- (void)photoPresentationView:(PhotoPresentationView *)view didShowPhotoAtIndex:(NSInteger)index;
@end

/*============================================================================
 Interface:   PhotoPresentationView
 =============================================================================*/

@interface PhotoPresentationView : UIView <UIAlertViewDelegate,UITableViewDataSource, UITableViewDelegate> {
    UIViewController    *holderViewController;
    BOOL    visibling;
    __weak id<PhotoPresentationViewDelegate> delegate;
}

@property (nonatomic, strong) NSMutableArray *photos;
@property (nonatomic, strong) NSMutableArray *photoURLs;
@property (nonatomic, weak) id<PhotoPresentationViewDelegate> delegate;
@property (nonatomic, assign) NSInteger currentPhotoIndex;

@property (nonatomic, strong) UIViewController    *holderViewController;
@property (strong, nonatomic) IBOutlet UIView *backgroundView;

@property (strong, nonatomic) IBOutlet UITableView *photoTableView;

@property (strong, nonatomic) IBOutlet UIButton *previousButton;
@property (strong, nonatomic) IBOutlet UIButton *nextButton;

@property (nonatomic, readonly) BOOL canMoveNext;
@property (nonatomic, readonly) BOOL canMovePrevious;
@property (nonatomic, assign) BOOL editButtonHidden;

+ (PhotoPresentationView *)sharedPhotoPresentationView;
- (void)showOnViewController:(UIViewController *)controller;
- (void)hide;
- (IBAction)didTouchedCancelButton:(id)sender;
- (IBAction)didTouchedDeleteButton:(id)sender;
- (IBAction)onTouchedPreviousOrNextButton:(id)sender;
- (IBAction)didTouchedOnNextButton:(id)sender;
- (void) showImageAtIndex:(NSInteger)index;

@end
